import request from '@/utils/request'
import store from '../store'

const api_name = '/edu/user'

export default {

  query(page,queryAll) {
    return request({
      url: `${api_name}/queryPage`,
      method: 'post',
      data:{
        "page":page,
        queryAll
      },
      headers:{
        "token" : store.state.user.token
      }
    })},
    usave(user) {
      return request({
        url: `/edu/login/save`,
        method: 'post',
        data:user
      })
    },
    getbyid(id) {
      return request({
        url: `${api_name}/bayId/`+id,
        method: 'get',
        headers:{
          "token" : store.state.user.token
        }
      })
    },
    del(id) {
      return request({
        url: `${api_name}/delete/`+id,
        method: 'delete',
        headers:{
          "token" : store.state.user.token
        }
      })
    },
    queryList(){
      return request({
        url: `${api_name}/list`,
        method: 'get',
        headers:{
          "token" : store.state.user.token
        }
      })
    }
    
  
}